package it.low.game.server;

import it.low.game.server.util.ServerLogManager;
import it.low.util.Constant;

import java.net.DatagramSocket;
import java.net.SocketException;


public class ServerNetworking {

	DatagramSocket socket;
	
	public void init(){
		ServerLogManager.logMsg("call ServerNetworking.init()");
		try{
			socket = new DatagramSocket(Constant.HOST_NET_PORT);
		}catch(SocketException se){
			ServerLogManager.logErr("SocketException", se);
			se.printStackTrace();
		}
	}
	
	public void start(){
		// open a ServerSocketChannel and configure for non-blocking mode
	}
	
	public void stop(){
		// open a ServerSocketChannel and configure for non-blocking mode
		socket.disconnect();
		socket.close();		
	}
	
	public static void readIncomingMessages(){
		
	}
	
}
